<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>产品管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/siteproduct/siteProduct/?orderBy=createTime desc">产品列表</a></li>
		<shiro:hasPermission name="siteproduct:siteProduct:edit"><li><a href="${ctx}/siteproduct/siteProduct/form">产品添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="siteProduct" action="${ctx}/siteproduct/siteProduct/?orderBy=createTime desc" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>发布主体：</label>
				<%-- <form:select path="provider" class="input-medium">
					<form:option value="" label=""/>
					<form:options items="${fns:getDictList('del_flag')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select> --%>
				<form:input path="provider" htmlEscape="false" maxlength="50" class="input-medium"/>
			</li>
			<li class="btns"><input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/></li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>发布主体</th>
				<th>发布时间</th>
				<th>项目状态</th>
				<th>项目类型</th>
				<th>项目名称</th>
				<th>项目简介</th>
				<th>项目备注</th>
				<th>预期收益率</th>
				<th>加息利率</th>
				<th>复利利率</th>
				<th>项目期限（天）</th>
				<th>计息时间</th>
				<th>起投金额（元）</th>
				<th>限投金额（元）</th>
				<th>创建人</th>
				<th>修改人</th>
				<th>修改时间</th>
				<th>总额</th>
				<th>可购余额</th>
				<th>单笔最小转出</th>
				<th>单笔最大转出</th>
				<th>单日最大转出</th>
				<th>单月最大转出</th>
				<th>单月最大转出次数</th>
				<th>投资增量（元）</th>
				<!-- <th>项目周期（月）</th> -->
				<th>合同模板路径</th>
				<th>风险提示函路径</th>
				<th>风评等级</th>
				<th>是否能使用加息券</th>
				<th>是否能使用红包</th>
				<th>购买锁定期（天）</th>
				<th>备用字段</th>
				<shiro:hasPermission name="siteproduct:siteProduct:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="siteProduct">
			<tr>
				<td><a href="${ctx}/siteproduct/siteProduct/form?id=${siteProduct.productId}">${siteProduct.provider}</a></td>
				<td>${siteProduct.createTime}</td>
				<td>${siteProduct.stauts == 0 ? "停售" : siteProduct.stauts == 1 ? "售卖" : siteProduct.stauts == 2 ? "未上线" : "未知"}</td>
				<td>${siteProduct.type == 1 ? "活期" : siteProduct.type == 2 ? "定期" : siteProduct.type == 3 ? "体验标" : "未知"}</td>
				<td>${siteProduct.productName}</td>
				<td>${siteProduct.title}</td>
				<td>${siteProduct.info}</td>
				<td>${siteProduct.rate}</td>
				<td>${siteProduct.addRate}</td>
				<td>${siteProduct.compoundRate}</td>
				<td>${siteProduct.type == 1 ? "活期" : siteProduct.productTime}</td>
				<td>${siteProduct.interestType == 0 ? "T+0" : siteProduct.interestType == 1 ? "T+1" : siteProduct.interestType == 2 ? "T+2" : "未知"}</td>
				<td>${siteProduct.minAmount}</td>
				<td>${siteProduct.maxAmount}</td>
				<td>${siteProduct.creator}</td>
				<td>${siteProduct.updator}</td>
				<td>${siteProduct.updateTime}</td>
				<td>${siteProduct.totalAmount}</td>
				<td>${siteProduct.balance}</td>
				<td>${siteProduct.minRedeem}</td>
				<td>${siteProduct.maxRedeem}</td>
				<td>${siteProduct.maxDaily}</td>
				<td>${siteProduct.maxMonthly}</td>
				<td>${siteProduct.maxNumber}</td>
				<td>${siteProduct.stepAmount}</td>
				<%-- <td>${siteProduct.term}</td> --%>
				<td>${siteProduct.agreementUrl}</td>
				<td>${siteProduct.riskLetterUrl}</td>
				<td>${siteProduct.riskLevel}</td>
				<td>${siteProduct.isCoupon == 0 ? "否" : siteProduct.isCoupon == 1 ? "是" : "未知"}</td>
				<td>${siteProduct.isPacket == 0 ? "否" : siteProduct.isPacket == 1 ? "是" : "未知"}</td>
				<td>${siteProduct.lockPeriod}</td>
				<td>${siteProduct.remark2}</td>
				<shiro:hasPermission name="siteproduct:siteProduct:edit"><td>
    				<a href="${ctx}/siteproduct/siteProduct/form?id=${siteProduct.productId}">修改</a>
					<%-- <a href="${ctx}/siteproduct/siteProduct/delete?id=${siteProduct.id}" onclick="return confirmx('确认要删除该产品吗？', this.href)">删除</a> --%>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>